Optimal. Leaf size=46 \[ \frac{x}{2 a}+\frac{i \cos (c+d x)}{2 d (a \cos (c+d x)+i a \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0294502, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.069, Rules used = {3082, 8} \[ \frac{x}{2 a}+\frac{i \cos (c+d x)}{2 d (a \cos (c+d x)+i a \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3082
Rule 8
Rubi steps
\begin{align*} \int \frac{\cos (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx &=\frac{i \cos (c+d x)}{2 d (a \cos (c+d x)+i a \sin (c+d x))}+\frac{\int 1 \, dx}{2 a}\\ &=\frac{x}{2 a}+\frac{i \cos (c+d x)}{2 d (a \cos (c+d x)+i a \sin (c+d x))}\\ \end{align*}
Mathematica [A] time = 0.0679494, size = 38, normalized size = 0.83 \[ \frac{2 (c+d x)+\sin (2 (c+d x))+i \cos (2 (c+d x))}{4 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.098, size = 59, normalized size = 1.3 \begin{align*}{\frac{-{\frac{i}{4}}\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{ad}}+{\frac{1}{2\,ad \left ( \tan \left ( dx+c \right ) -i \right ) }}+{\frac{{\frac{i}{4}}\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{ad}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.459964, size = 86, normalized size = 1.87 \begin{align*} \frac{{\left (2 \, d x e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.544379, size = 61, normalized size = 1.33 \begin{align*} \begin{cases} \frac{i e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text{for}\: 4 a d e^{2 i c} \neq 0 \\x \left (\frac{\left (e^{2 i c} + 1\right ) e^{- 2 i c}}{2 a} - \frac{1}{2 a}\right ) & \text{otherwise} \end{cases} + \frac{x}{2 a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14433, size = 81, normalized size = 1.76 \begin{align*} -\frac{\frac{i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a} - \frac{i \, \log \left (-i \, \tan \left (d x + c\right ) + 1\right )}{a} + \frac{-i \, \tan \left (d x + c\right ) - 3}{a{\left (\tan \left (d x + c\right ) - i\right )}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]